<template>
  <!-- 遮罩层 -->
  <div class="masks">
    <div class="del">
      <div class="del_icon">
        <div class="circular_one">
          <div class="circular_two">
            <div class="circular_three">
              <i class="appIcon-iconfont appIcon-wenjianhuishou-zhihuimoren icon"></i>
            </div>
          </div>
        </div>
      </div>
      <div class="text">
        <div class="text_wen">是否删除当前所选内容</div>
      </div>
      <div class="del_btn">
        <button class="none" @click="close">取消</button>
        <button class="sure" @click="handledelete">删除</button>
      </div>
    </div>
  </div>
</template>
<script lang="ts" setup>
import { useMainStore, useSlidesStore, useKeyboardStore, useScreenStore } from '@/store'
const mainStore = useMainStore()

const handledelete = () => {
  // alert('接口')
  if (mainStore.deltype === 1) {
    mainStore.$patch({
      delone: true,
    })
  } else {
    mainStore.$patch({
      delmore: true,
    })
  }
  mainStore.$patch({
    del: false,
  })

  // console.log(checkboxValue.value)
  // request.post('/hhxs-ssc/sc/chart/deleteChartBatch', checkboxValue.value).then((res: any) => {
  // if (res.data.code === 200) {
  // getDataList()
  // showCheckbox.value = false
  // checkboxValue.value = []
  // }
  // })
}
// 取消
const close = () => {
  mainStore.$patch({
    del: false,
  })
}
</script>
<style lang="scss" scoped>
.masks {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.2);
  z-index: 1040;
  display: flex;
  align-items: center;
  justify-content: center;
  // transition: all 0.5s;
}

.del {
  width: 340px;
  height: 238px;
  background: #fff;
  border-radius: 25px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;

  &::after {
    content: '';
    display: inline-block;
    position: absolute;
    bottom: -20px;
    width: 280px;
    height: 20px;
    background-image: linear-gradient(135deg, #d583f1 0%, #75cdef 100%, #aae1f5 100%);
    border-radius: 0 0 25px 25px;
  }
}

.del_icon {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-200px);
  color: #fff;

  .circular_one {
    width: 168px;
    height: 166.54px;
    background-image: linear-gradient(135deg, rgba(213, 131, 241, 0.3) 0%, rgba(117, 205, 239, 0.3) 100%, rgba(170, 225, 245, 0.3) 100%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;

    .circular_two {
      width: 134px;
      height: 132.83px;
      background-image: linear-gradient(135deg, rgba(213, 131, 241, 0.6) 0%, rgba(117, 205, 239, 0.6) 100%, rgba(170, 225, 245, 0.6) 100%);
      border-radius: 50%;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .circular_three {
      width: 108px;
      height: 108px;
      background-image: linear-gradient(135deg, #d583f1 0%, #75cdef 100%, #aae1f5 100%);
      border-radius: 50%;
      display: flex;
      justify-content: center;
      align-items: center;
    }
  }

  .icon {
    font-size: 48px;
  }
}

.text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 199px;
  height: 18px;
  font-family: PingFangSC-Regular;
  font-size: 18px;
  color: #6f6d9d;
  letter-spacing: 1.8px;
  line-height: 18px;
  font-weight: 400;
}

.del_btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(50px);
  display: flex;

  .none {
    margin: 0 14px;
    width: 90px;
    height: 40px;
    border: 1px solid rgba(104, 108, 232, 1);
    border-radius: 10px;
    background-color: #fff;
  }

  .sure {
    margin: 0 14px;
    width: 90px;
    height: 40px;
    background: rgba(104, 108, 232, 1);
    border-radius: 10px;
    border: none;
    color: #fff;
  }
}
</style>